/*! \file ResourceManager.h
 *	\brief <write description for ResourceManager.h>
 *
 *	created:	2010/07/27
 *	created:	27:7:2010   16:46
 *	filename: 	C:\src\tactics-engine\libs\rm\ResourceManager.h
 *	file path:	C:\src\tactics-engine\libs\rm
 *	file base:	ResourceManager
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _rm_RESOURCEMANAGER_H_
#define _rm_RESOURCEMANAGER_H_

#pragma once

#include "core/SmartPtr.h"
#include "io/BaseIStream.h"
#include "resource_manager/defs.h"

namespace tt{
namespace rm{

class RM_API ResourceManager
{
public:
	ResourceManager();
	virtual ~ResourceManager();

	static void CreateInstance(ResourceManager*);
	static void DestroyInstance();

	static ResourceManager& GetInstance();

	SharedPtr<io::BaseIStream> GetStream(const String&);

protected:
	virtual SharedPtr<io::BaseIStream> OnGetStream(const String&) = 0;
};

} //namespace rm

RM_API rm::ResourceManager& ttResourceManager();

} //namespace tt

#endif //_rm_RESOURCEMANAGER_H_
